/**
 * 产品采集相关请求
 * */
import ApiBase from './ApiBase';
import Urls from '../ApiUrls';

class ApiImpProduct {
  queryProductList(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_PAGE, params);
  }

  queryAuditedProductList(params) {
    return ApiBase.send(Urls.URL_IMP_AUDITED_PRODUCT_PAGE, params);
  }

  queryProduct(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_INFO, params);
  }

  updateProduct(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_UPDATE, params);
  }

  deleteProduct(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_DELETE, params);
  }

  bannedProducts(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_BANNED, params)
  }

  cancelBannedProducts(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_CANCEL_BANNED, params);
  }

  bannedImpProducts(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_IMP_BANNED, params);
  }

  cancelBannedImpProducts(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_CANCEL_IMP_BANNED, params);
  }

  saveProductTags(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_SAVE_TAGS, params);
  }

  queryAllCategories() {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_ALL_CATEGORIES)
  }

  queryStation() {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_STATION);
  }

  addOrUpdateCategory(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_ADD_OR_UPDATE_CATEGORY, params);
  }

  deleteCategory(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_DELETE_CATEGORY, params)
  }

  putInQueue(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_PUT_IN_QUEUE, params);
  }

  importProduct(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_IMPORT, params, 500);
  }

  querySupplierList(params) {
    return ApiBase.send(Urls.URL_SUPPLIER_PAGE, params);
  }

  querySupplier(params) {
    return ApiBase.send(Urls.URL_SUPPLIER_INFO, params);
  }

  addSupplier(params) {
    return ApiBase.send(Urls.URL_SUPPLIER_ADD, params);
  }

  updateSupplier(params) {
    return ApiBase.send(Urls.URL_SUPPLIER_UPDATE, params);
  }

  deleteSupplier(params) {
    return ApiBase.send(Urls.URL_SUPPLIER_DELETE, params);
  }

  addSupplierToBlacklist(params) {
    return ApiBase.send(Urls.URL_SUPPLIER_ADD_TO_BLACKLIST, params);
  }

  removeSupplierFromBlacklist(params) {
    return ApiBase.send(Urls.URL_SUPPLIER_REMOVE_FROM_BLACKLIST, params);
  }

  translateSizeTable(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_TRANSLATE_SIZE, params);
  }

  queryImagesByPCode(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_IMAGES, params);
  }

  checkProducts(params) {
    return ApiBase.send(Urls.URL_IMP_PRODUCT_CHECK, params);
  }

  queryImportQueueList(params) {
    return ApiBase.send(Urls.URL_PRODUCT_IMPORT_QUEUE_LIST, params);
  }

  reImport(params) {
    return ApiBase.send(Urls.URL_PRODUCT_IMPORT_QUEUE_RE_IMPORT, params);
  }

  deleteImportRecord(params) {
    return ApiBase.send(Urls.URL_PRODUCT_IMPORT_QUEUE_DELETE, params);
  }

  getUploadUrl() {
    return Urls.URL_PRODUCT_IMPORT_UPLOAD_IMAGES;
  }

  saveSelectedProduct(params) {
    return ApiBase.send(Urls.URL_SELECTED_PRODUCT_SAVE, params);
  }

  querySelectedProductList(params) {
    return ApiBase.send(Urls.URL_SELECTED_PRODUCT_PAGE, params);
  }

  collectImages(params) {
    return ApiBase.send(Urls.URL_COLLECT_PRODUCT_IMGS, params);
  }
  batchUpdateProduct(params){
    return ApiBase.send(Urls.URL_IMP_PRODUCT_BATCH_UPDATE, params);
  }
}

export default ApiImpProduct;
